Solutions for detecting sparks in a channel are disclosed in documents WO 00/39769, U.S. Pat. Nos. 5,061,026 and 7,026,619, for example. One of the main problems of the existing spark detection systems is that in order to effectively see the sparks over the whole cross section of a channel, at least two devices need to be used. Typically two devices are placed opposite to each other so that they both together can see the whole cross section. If only one device is used, sparks from the whole cross section of the pipe cannot be detected. Another problem is that detection sensitivity variations are large within the sensitivity range. In particular, the detection sensitivity goes near to zero at angles +90°and −90°. Spark detection systems are typically used in applications such as fire extinguishing systems whereby it is very important that the sensitivity is good and uniform across the whole cross section of the channel. Another typical disadvantage is also that the device penetrates too much into the channel and thereby the device is at risk of damage because of the material flow. If a protective housing of the device is made of optically transparent material the durability of the housing is poor. Sensor elements are also exposed to electromagnetic interference, which reduces the sensitivity of the device. If the dimensions of the spark sensing device are large problems concerning attaching the device and vibration resistance arise.